package com.jkl.webserver.Web.DAO.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jkl.webserver.Web.DAO.pojo.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface AccountMapper extends BaseMapper<Account> {
    default Account selectPU(String email){
        return selectOne(new QueryWrapper<Account>()
                .select("password","userName")
                .eq("email",email));
    }
    default Account selectU(@Param("email") String email){
        return selectOne(new QueryWrapper<Account>()
                .select("userName")
                .eq("email",email));
    }
}
